{% extends "base.html" %}

{% block title %}Search{% if query %} Results{% endif %}{% endblock title %}

{% block head_includes %}
  <link rel="shortcut icon" href="/favicon.ico"/>
  <link rel="alternate" href="{{ request.path }}rss/" type="application/rss+xml" title="{{ username }}'s RSS Feed"/>
  <meta name="description" content="{{ username }}'s bookmarks" />
  <meta name="keywords" content="bookmarks, social bookmarks, django"/> 
  <meta name="author" content="{{ username }}"/> 
  <link rel="stylesheet" type="text/css" href="/media/css/paginator.css" media="screen"/>
{% endblock head_includes %}


{% block subnav_description %}
  {% include "bookmarks/subnav_desc.html" %}
{% endblock subnav_description %}

{% block sidebar %}
  {% include "bookmarks/sidebar.html" %}
{% endblock sidebar %}

{% block content %}
  <div class="bookmarks">
  {% spaceless %}
  {% if query %}
    {% if results %} 
      {% load tagging_tags %}
      <ul>
      {% for bookmark in results %}
        {% tags_for_object bookmark as post_tags %}
        <li>
          <a href="{{ bookmark.url }}" title="Tags: {% for tag in post_tags %}{% if not forloop.first %}, {% endif %}{{ tag }}{% endfor %}" target="_new">{{ bookmark.title }}</a> 
        </li>
      {% endfor %}
      </ul>
    {% else %}
      Your search did not return any results.
    {% endif %}
  {% endif %}
  {% endspaceless %}
  </div>
{% endblock content %}
